package com.zuihai.app.mvp.ui.holder;

import android.view.View;
import android.widget.TextView;

import com.zuihai.app.R;
import com.zuihai.app.mvp.model.entity.HomeItem;

import butterknife.BindView;

/**
 * Created by Administrator on 2017/5/4 0004.
 */

public class HomeRecyclerThreeHolder extends BaseViewHolderWraper<HomeItem> {

    @BindView(R.id.tv_title)
    TextView mTitle;

    @BindView(R.id.tv_auther)
    TextView mAuther;

    @BindView(R.id.tv_comment)
    TextView mComment;

    @BindView(R.id.tv_favour)
    TextView mFavour;

    public HomeRecyclerThreeHolder(View itemView) {
        super(itemView);
    }

    public void fillData(HomeItem data, int position) {
        loadImage(R.id.iv_cover, data.picture.get(0).url);
        setText(R.id.tv_title, data.title);
        setText(R.id.tv_auther, data.name);
        setTextFormat(R.id.tv_comment, data.commentCount);
        setTextFormat(R.id.tv_favour, data.favour+"");
    }
}
